package tech.aistar.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.aistar.mapper.UserMapper;
import tech.aistar.pojo.User;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    
    @Override
    public User login(String username, String password) {
        return userMapper.getByUsernameAndPassword(username,password);
    }
    
    @Override
    public User emailLogin(String email) {
        return userMapper.getByEmail(email);
    }
    
}
